The present invention relates to graphics overlay for video data providing independent blending control for how graphics pixels are blended together from how graphics pixels are blended with the background video.
A function of increasing importance is the simultaneous provision of graphics and video on a display. The video and graphics may be provided in a number of different contexts, whether through multimedia distribution systems, combined computer and television functions or video games. Current application program interface (API) definitions for three-dimensional graphics specify a color definition utilizing four components, red, green, blue and alpha. The red, green and blue components represent actual color, and alpha represents a blending factor which indicates a level of transparency. One use of alpha blending, for example, is to represent a vehicle interior as seen through a car windshield. Pixels representing points in areas of polygons modeling a car would have the alpha representing the windshield set to an intermediate value, while polygons representing the vehicles interior would have alpha values set to make them appear opaque. There is also the case of blending with the background color or background image if there are no polygons underneath a particular pixel in the windshield. The case of additional transparent polygons underneath the windshield is also possible.
Alpha blending is a well-known technique for providing transparency information for transparent or translucent objects. In alpha blending, a resultant color of a pixel is a combination of a foreground color, i.e., the color of the translucent object, and a background color, i.e. the color of what is underneath the blended polygon. Alpha blending has been implemented by rendering polygons through a stipple mask whose on-off density is proportional to the transparency of the object, although this technique is rarely used anymore. The most common implementation is to use the alpha value to blend colors on a pixel-by-pixel basis. For greatest convenience in computation, alpha is given as an unsigned integer value in the range of 0 to 255 for each color pixel. A new pixel equals ((xcex1) (pixel A color component)+(1xe2x88x92xcex1)(pixel B color component))/255 where A and B are the foreground and background color components respectively. This equation is applied to each individual color components, red, green, blue and alpha resulting in new red, green and blue and alpha components. The capital letters RGBA signal is commonly provided by a 32-bit frame buffer with 24 bits of color, 8 each for red, green and blue and 8 bits for the value of alpha. It is also recognized that there are alternate forms of this blending equation such as ((xcex1+1) (pixel A color component)+(1xe2x88x92(xcex1+1)) (pixel B color component)) greater than  greater than 7. This form of the equation allows a right shift ( greater than  greater than 7) to replace the divide by 255. A shift operation is executed much more quickly than a divide operation. With many pixels to process this makes the overall processing much faster.
A further graphics capability beyond simple alpha blending may be required in systems where, for example, it is desired to have three-dimensional graphics blended with a video background. The RGBA signal methodology is not robust enough to accommodate both blending of colors of polygons within the rendered 3D image in addition to an independent blending of the information in the rendered image with a video background. The alpha value is used to provide blending for pixel colors and for blending with the background video. There is no way to distinguish whether the blending is to be applied to the pixel color or with the background video. In setting the RGBA values for the above windshield example, the capability is not provided to allow a transparent windshield through which the vehicle interior is seen and in which there is no video blending of the interior with background video. It is not a satisfactory solution simply to add an additional digital word in addition to the digital word representing the color definition RGBA. The common RGBA definition is 32 bits per pixel, or 16 bits per pixel in some systems. These bit lengths already correspond conveniently with current sizes for word-aligned direct memory access (DMA) transfers, word-aligned memory operations and standard bus sizes.
In accordance with the present invention, color definition is provided which allows for alpha blending and also provides for video blending. Additionally, the ability to maintain a standard color definition length such as 32 bits is maintained. A format called RGBAV is provided which modifies color definition to allow for an additional component to control video blending. A multibit definition is established for pixel color definition including values for red, green, blue, alpha blending and video blending. In one form 8 bits each may be provided for the red, green and blue values with the remaining 8 bits divided between the alpha and video values. Additionally, a specialized processor is provided in which coded RGBAV values are read and in which graphics are processed using the alpha value. The RGBA output is combined with a video or V processing value to provide a composite. The technique used to blend graphics with video is similar to the one explained previously, for example, (V)graphics+(I-V)video)/maximum_V to generate a display pixel color. The same method can be applied to other color formats beyond RGB. For example, these same principles may be applied to YUV encoding.